#include <stdio.h>
#include <ctype.h>

char s[100000];
int n;

int leaf(int i){
   if (s[i]=='(' && s[i+1]==')' && s[i+2]=='(' && s[i+3]==')' ) return 1;
   return 0;
}

int check(void){
   int i, lev, sum[10000], nr;

   sum[0]=lev=0;
   for(i=0;s[i]!='\0';i++){
      if(s[i]=='(') lev++;
      else if(s[i]==')') lev--;
      else {
         sscanf(s+i, "%d", &nr);
         sum[lev]=sum[lev-1]+nr;
         while((isdigit(s[i]) || s[i]=='-') && isdigit(s[i+1])) i++;
         if (sum[lev]==n && leaf(i+1)) return 1;
      }
   }
   return 0;
}

int main(){
   char ch;
   int i, lev;

   while(scanf("%d ", &n)==1){
      i=lev=0;
      do{
         ch=getchar();
         if (ch==' ' || ch=='\t' || ch=='\n' || ch=='\r') continue;
         s[i++]=ch;
         if (ch=='(') lev++;
         if (ch==')') lev--;
      }while(lev);
      s[i++]='\0';
      if (check()) printf("yes\n");
      else printf("no\n");
   }

   return 0;
} 
